<div ng-init="dvm.init()">
  <form name="passwordForm" class="form-check" ng-submit="dvm.save(passwordForm.$valid)" novalidate>
    <div class="ngdialog-message">
      <h3>修改密码</h3>
      <div class="form-group">
        <input type="password" name="password" ng-model="dvm.password" class="form-control" placeholder="旧密码" autofocus required>
        <p class="alert alert-danger" ng-show="passwordForm.$submitted && passwordForm.password.$error.required">
          <i class="glyphicon glyphicon-info-sign"></i> 旧密码不能为空
        </p>
      </div>
      <div class="form-group">
        <input type="password" name="newPassword" ng-model="dvm.newPassword" class="form-control" placeholder="新密码" required>
        <p class="alert alert-danger" ng-show="passwordForm.$submitted && passwordForm.newPassword.$error.required">
          <i class="glyphicon glyphicon-info-sign"></i> 新密码不能为空
        </p>
      </div>
      <div class="form-group">
        <input type="password" name="confirmPassword" ng-model="dvm.confirmPassword" class="form-control" placeholder="确认新密码" required>
        <p class="alert alert-danger" ng-show="passwordForm.$submitted && passwordForm.confirmPassword.$error.required">
          <i class="glyphicon glyphicon-info-sign"></i> 确认新密码不能为空
        </p>
        <p class="alert alert-danger" ng-show="passwordForm.$submitted && dvm.newPassword != dvm.confirmPassword">
          <i class="glyphicon glyphicon-info-sign"></i> 两次输入的新密码不一致
        </p>
      </div>
    </div>
    <div class="ngdialog-buttons">
      <button type="button" class="ngdialog-button ngdialog-button-secondary" ng-click="closeThisDialog()">取 消</button>
      <button type="submit" class="ngdialog-button ngdialog-button-primary">保 存</button>
    </div>
  </form>
</div>